﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PJ.Business.Partner;
using PJ.Business.Inventory;
using PJ.Framework.Common;
using PJ.Data.SalePurchase.Sale;

namespace PJ.Business.SalePurchase.Sale
{
    public class CustomerShoppingCartItem : ShoppingCartItem<ICustomerShoppingCartItemData>, ICustomerShoppingCartItem
    {

        public CustomerShoppingCartItem(ICustomerShoppingCartItemData data)
            : base(data)
        {
        }
        public CustomerShoppingCartItem()
        {
        }

        public string CustomerID
        {
            get
            {
                return PartnerID;
            }
            set
            {
                if (value != PartnerID)
                {
                    PartnerID = value;
                }
            }
        }

        private ICustomerService m_CustomerService;

        protected override IEntityService ParentService
        {
            get 
            {
                if (m_CustomerService == null)
                    m_CustomerService = InjectionBroker.Resolve<CustomerService>();
                return m_CustomerService;
            }
        }
    }
}
